<extend file='resource/admin/base'/>
<block name="content">

    <!-- TAB NAVIGATION -->
    <ul class="nav nav-tabs" role="tablist">
        <li><a href="{{u('index')}}">项目列表</a></li>
        <li class="active"><a href="{{u('post')}}">项目添加</a></li>
    </ul>
    <form action="" method="POST" class="form-horizontal" role="form">
        <div class="panel panel-default">
            <div class="panel-heading">
                <h3 class="panel-title">项目管理</h3>
            </div>
            <div class="panel-body">


                <div class="form-group">
                    <label for="" class="col-sm-2 control-label">栏目名称</label>
                    <div class="col-sm-10">
                        <input type="text" class="col-sm-10" class="form-control" name="cate_name"
                               value="{{$oldData['cate_name']}}" id="">
                    </div>
                </div>
                <div class="form-group">
                    <label for="" class="col-sm-2 control-label">栏目排序</label>
                    <div class="col-sm-10">
                        <input type="text" class="col-sm-10" class="form-control" name="cate_sort"
                               value="{{$oldData['cate_sort']}}" id="">
                    </div>
                </div>
                <div class="form-group">
                    <label for="" class="col-sm-2 control-label">外部链接</label>
                    <div class="col-sm-10">
                        <input type="text" class="col-sm-10" class="form-control" name="cate_linkurl"
                               value="{{$oldData['cate_linkurl']}}" id="">
                    </div>
                </div>
                <
                <div class="form-group">
                    <label for="" class="col-sm-2 control-label">所属栏目</label>
                    <div class="col-sm-10">
                        <select name="cate_pid" id="inputID" class="form-control">
                            <option value="0"> -- 顶级栏目 --</option>
                            <foreach from="$cateData" value="$d">
                                <option
                                <if value="$oldData['cate_pid']==$d['cate_id']">selected</if>
                                value="{{$d['cate_id']}}"> -- {{ $d['_cate_name']}}-- </option>
                            </foreach>
                        </select>
                    </div>
                </div>
                <div class="form-group">
                    <label for="" class="col-sm-2 control-label">栏目描述</label>
                    <div class="col-sm-10">
                        <textarea name="cate_description" class="form-control" cols="30" rows="10">{{$oldData['cate_description']}}</textarea>
                    </div>
                </div>


                <button type="submit" class="btn btn-primary">Submit</button>

            </div>
        </div>
    </form>

</block>